<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
</head>

<body>
        <ul class="ul-news-i"style="width:100%;text-align:center;margin-top:100px;list-style:none">
            <li>
                <div class="pad" >
                    <div class="txt">
                      <div class="pic"><img style="height:150px;width:200px" src="" alt=""></div>
                        <span></span>
                        <h3><a href="news_info_5_313.html"></a></h3>
                        <p style="width:40%;margin: 0 auto"></p>
                        <a href="" class="more"></a>
                    </div>
                    <!-- <div class="hover">
                        <div class="img" style="background: url(images/14561176714477.png) 0 0 /100% 100% no-repeat;background: url(images/14568143499060.jpg) 0 0 no-repeat\9;"></div>
                        <div class="pad">
                            <h3>给设计师的网页动画设计基础</h3>
                            <p>随着技术的积累，网页中的动画也已经是遍地开花，它时尚，有趣，也人性化。不断涌现的新技术和新工</p>
                        </div>
                    </div> -->
                </div>
            </li>
    </ul>
    <script type="text/javascript" src="js/jquery.js"></script>
    <script>
        $(document).ready(function (option) {
            var id = option.id
            console.log(id)
            $.ajax({
                url: 'http://47.98.143.77:8088/eweb/apiIndex/caseDetail.do',
                type: 'GET',
                data: {
                    'id':id
                },
                dataType: 'json',
                async: true,
                success: function (data) {
                    var data = data.content
                    console.log(data)
                    // for( var i = 0;i<data.length;i++){
                        var detailHTML = '<li><div class="pad" ><div class="txt"><div class="pic"><img style="height:150px;width:200px" src="'+data.imgUrl+'" alt=""></div><span>2018.11.27</span><h3><a href=""></a></h3><p style="width:40%;margin: 0 auto">'+data.introduction+'</p><a href="" class="more"></a></div></li>'
                        $(".ul-news-i").append(detailHTML)
                    // }
                },
                error: function () {
                    console.log("请求失败")
                }
            })
            return false;
        })

    </script>


</body>

</html>